//
//  INoteEvent.h
//  note-recog
//
//  Created by Philip Mulcahy on 09/01/2012.
//  Copyright (c) 2012 Philip Mulcahy. All rights reserved.
//

#ifndef note_recog_INoteEvent_h
#define note_recog_INoteEvent_h

#include <string>
#include <iostream>

class INoteEvent
{
public:
    /// use this to avoid exceptions from the getters
    virtual bool isGood() const = 0;
    
    /// may throw or return invalid value if isGood() returns false
    virtual int getNoteNumber() const = 0;
    
    /// may throw or return invalid value if isGood() returns false
    virtual float getFrequency() const = 0;
    
    /// may throw or return invalid value if isGood() returns false
    virtual std::string getNoteString() const = 0;
    
    /// won't throw unless you're really really unlucky
    virtual std::string toString() const = 0;
    
    /// won't throw
    virtual double getStartTime() const = 0;
};

std::ostream& operator<<( std::ostream&, const INoteEvent& );

#endif
